#include <lcir/IR/IRRewritter.h>
#include <lcir/IR/Value.h>
namespace lcir {
void IRRewritter::replaceValue(Value *oldVal, Value *newVal) {
  if (oldVal == newVal) return;
  oldVal->rauw(newVal);
  auto *expr = oldVal->getDefExpr();
  expr->eraseFromLambda();
}
}  // namespace lcir